//
//  DetailFirstTableViewCell.m
//  B
//
//  Created by Sunpeng on 15/11/6.
//  Copyright © 2015年 wangzhan. All rights reserved.
//

#import "DetailFirstTableViewCell.h"

@implementation DetailFirstTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self DataSource];
    }
    return self;
    
    
}



-(void)DataSource{
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH/2-45*XWIDTH, 20*XHIGHT, 100*XWIDTH, 60*XHIGHT)];
    
    //self.nameLabel.backgroundColor = [UIColor blueColor];
    [self addSubview:self.nameLabel];
    self.nameLabel.font = [UIFont systemFontOfSize:15*XHIGHT];
    self.nameLabel.numberOfLines = 0;
    
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    
//    self.wujiaoxingLael = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH/2-48, 70, 106, 35)];
//    self.wujiaoxingLael.backgroundColor = [UIColor purpleColor];
    //[self addSubview:self.wujiaoxingLael];
    
    self.recommended_reasonLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH/2-128*XWIDTH, 70*XHIGHT, 266*XWIDTH, 60*XHIGHT)];
    //self.recommended_reasonLabel.backgroundColor = [UIColor redColor];
    [self addSubview:self.recommended_reasonLabel];
    self.recommended_reasonLabel.font = [UIFont systemFontOfSize:15*XHIGHT];
    self.recommended_reasonLabel.numberOfLines = 0;
    self.recommended_reasonLabel.textAlignment = NSTextAlignmentCenter;
    
    
    self.messageLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH/2-48*XWIDTH, 145*XHIGHT, 106*XWIDTH, 35*XHIGHT)];
    //self.messageLabel.backgroundColor = [UIColor cyanColor];
    self.messageLabel.text = @"基本信息";
    [self addSubview:self.messageLabel];
     self.messageLabel.textAlignment = NSTextAlignmentCenter;
    
    
}
-(void)setDetailM:(DetaiModel *)detailM{
    
    _detailM = detailM;
    
    self.nameLabel.text =_detailM.name ;
self.recommended_reasonLabel.text =_detailM.recommended_reason;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
